"""
根据传入的名称以及config构建rank处理类
"""
from rank.base_rank import BaseRank


class RankFactory:
    @classmethod
    def create_service(cls, config):
        service = None
        if config["name"] == "base_rank":
            service = BaseRank(config)

        if not service:
            print("init rank service %s failed " % config["name"])
        return service

